package com.mark.exception;

import com.mark.enums.ResultEnum;

/**
 * Created by Choisaaaa on 2018/6/21.
 * 自定义异常
 */

public class SellException extends RuntimeException{
    private Integer code;

    public SellException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code, String defaultMessage) {
        super(defaultMessage);
        this.code = code;
    }
}
